package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the rinterviewer database table.
 * 
 */
@Entity
@NamedQuery(name="Rinterviewer.findAll", query="SELECT r FROM Rinterviewer r")
public class Rinterviewer implements Serializable {
	@Override
	public String toString() {
		return "Rinterviewer [rviwerid=" + rviwerid + ", rviwername=" + rviwername + ", rbiographicals="
				+ rbiographicals + ", rinterview=" + rinterview + "]";
	}

	private static final long serialVersionUID = 1L;

	@Id
	private int rviwerid;

	private String rviwername;

	//bi-directional many-to-one association to Rbiographical
	@OneToMany(mappedBy="rinterviewer")
	private List<Rbiographical> rbiographicals;

	//bi-directional many-to-one association to Rinterview
	@ManyToOne
	@JoinColumn(name="riviewid")
	private Rinterview rinterview;

	public Rinterviewer() {
	}

	public int getRviwerid() {
		return this.rviwerid;
	}

	public void setRviwerid(int rviwerid) {
		this.rviwerid = rviwerid;
	}

	public String getRviwername() {
		return this.rviwername;
	}

	public void setRviwername(String rviwername) {
		this.rviwername = rviwername;
	}

	public List<Rbiographical> getRbiographicals() {
		return this.rbiographicals;
	}

	public void setRbiographicals(List<Rbiographical> rbiographicals) {
		this.rbiographicals = rbiographicals;
	}

	public Rbiographical addRbiographical(Rbiographical rbiographical) {
		getRbiographicals().add(rbiographical);
		rbiographical.setRinterviewer(this);

		return rbiographical;
	}

	public Rbiographical removeRbiographical(Rbiographical rbiographical) {
		getRbiographicals().remove(rbiographical);
		rbiographical.setRinterviewer(null);

		return rbiographical;
	}

	public Rinterview getRinterview() {
		return this.rinterview;
	}

	public void setRinterview(Rinterview rinterview) {
		this.rinterview = rinterview;
	}

}